#define _CRT_SECURE_NO_WARNINGS 1
#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>


void reverse(char arr[], int left, int right)
{
	while (left < right)
	{
		char tmp = arr[left];
		arr[left] = arr[right];
		arr[right] = tmp;
		left++;
		right--;
	}
}


int main()
{
	char arr[] = "ABCDE";
	int k, len = strlen(arr);
	scanf("%d", &k);
	reverse(arr, 0, k - 1);
	reverse(arr, k, len - 1);
	reverse(arr, 0, len - 1);
	printf("%s", arr);
	return 0;
}